Provide a helper function that remove all child nodes of a node.
Manipulating
This section shows you how to add, remove, copy DOM elements
Get and Set the Text Content of an Element
Get or set the text content of an Element using the textContent property.
Get and Set the HTML Content of an Element
Get and set the HTML of an element using the innerHTML property.
Iterate Over Selected Elements
Iterate over selected elements using forEach() method and plain old for loop.
Clone an Element
Clone an element and all of its descendants.
Insert an Element After Another
Insert an element after another in the DOM tree.
Insert an Element Before Another
Insert a new element before another in the DOM tree.
Remove a DOM Element
Remove an element from the DOM tree using the removeChild() method.
Replace a DOM Element
Replace an element by a new one.
Create a DOM Element
Create a new Element and add it to the DOM tree.